home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / memlockd.postinst < prev    next >
Encoding:
Text File  |  2008-05-07  |  1.4 KB  |  55 lines

  1. #!/bin/sh
  2. # postinst script for memlockd
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <postinst> `configure' <most-recently-configured-version>
  10. #        * <old-postinst> `abort-upgrade' <new version>
  11. #        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
  12. #          <new-version>
  13. #        * <postinst> `abort-remove'
  14. #        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
  15. #          <failed-install-package> <version> `removing'
  16. #          <conflicting-package> <version>
  17. # for details, see http://www.debian.org/doc/debian-policy/ or
  18. # the debian-policy package
  19.  
  20.  
  21. case "$1" in
  22.     configure)
  23.     if ! getent group memlockd > /dev/null ; then
  24.         addgroup --system --group memlockd > /dev/null
  25.     fi
  26.     if ! getent passwd memlockd > /dev/null ; then
  27.         adduser --system --no-create-home --ingroup memlockd \
  28.         --gecos "memlockd system account" --no-create-home \
  29.         --disabled-login --home /usr/lib/memlockd --shell /bin/false \
  30.         --disabled-password memlockd > /dev/null
  31.     fi
  32.  
  33.     update-rc.d memlockd start 75 2 3 4 5 . stop 05 0 1 6 . >/dev/null || true
  34.  
  35.     ;;
  36.  
  37.     abort-upgrade|abort-remove|abort-deconfigure)
  38.     ;;
  39.  
  40.     *)
  41.         echo "postinst called with unknown argument \`$1'" >&2
  42.         exit 1
  43.     ;;
  44. esac
  45.  
  46. if which invoke-rc.d >/dev/null 2>&1; then
  47.     invoke-rc.d memlockd restart
  48. else
  49.     /etc/init.d/memlockd restart
  50. fi
  51.  
  52. exit 0
  53.  
  54.  
  55.